@extends('default.layouts.personalLogin')
@section('title')个人会员登录 | {{Site::get('webname')}} @endsection

@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/personal/login.css')}}">
@endsection

@section('content')
    {{--会员登录信息--}}
    <div class="content">
        <div class="login">
            <div class="logInfo">
                {{--弹性运动--}}
                <div class="logRel">
                    <div class="logPos">
                        {{--会员登录--}}
                        <div class="logoTop">
                            <div class="logo"><a href="{{asset('/')}}"><img src="{{asset('/default/images/logo/logo.png')}}"></a></div>
                        </div>
                        <div class="logWay">
                            {{--会员登录左边--}}
                            <div class="wLeft">
                                <div class="ordinary">
                                    <ul>
                                        <li class="active"><a><i></i>普通登录方式</a></li>
                                        <li><a><i class="mobile"></i>手机动态码登录</a></li>
                                    </ul>
                                </div>
                                <div class="lCon ordInfo">
                                    <form action="{{ url('personal/ajax_login') }}" name="loginForm" id="loginForm" method="post" >
                                        {!! csrf_field() !!}
                                        <dl>
                                            <dt><input name="username" id="username" value="" type="text" class="inpText" placeholder="请输入用户名/手机号码" tip="请输入用户名/手机号码"></dt>
                                            <dd class="errinfo"></dd>
                                        </dl>
                                        <dl>
                                            <dt><input name="password" id="password" value="" type="password"  class="inpText" placeholder="请输入密码" tip="请输入密码"></dt>
                                            <dd class="errinfo"></dd>
                                        </dl>

                                        <dl>
                                            <dd style="display: block; height:20px;">
                                        <span>
                                            <input name="remember" type="checkbox" checked  class="agree" id="remember"/>
                                            <label for="remember">记住密码</label>
                                        </span>
                                                <span class="forgetPass"><a href="{{url('personal/find_password')}}">忘记密码?</a></span>
                                            </dd>
                                        </dl>
                                        <dl style=" margin-top: 20px;">
                                            <dt><input id="sub" value="登录" type="submit" class="sub"></dt>
                                        </dl>
                                    </form>
                                    <div class="noPerson"><span>还不是个人会员?</span> <a href="{{ url('personal/register') }}">立即注册<i></i></a></div>
                                </div>

                                <div class="lCon mobInfo disNone">
                                    <form action="{{url('personal/ajax_mobile_login')}}" name="loginMobile" id="loginMobile" method="post" onsubmit="return false">
                                        {!! csrf_field() !!}
                                        <dl>
                                            <dt><input name="mobile" id="mobile" value="{{request('mobile')}}" type="text" class="inpText" placeholder="请输入手机号码" tip="请输入手机号码" ></dt>
                                            <dd class="errinfo"></dd>
                                        </dl>
                                        <dl>
                                            <dt style="width: 160px;"><input name="mobCode" id="mobCode" type="text" class="inpText" style="width: 140px;"
                                                                             placeholder="请输入手机验证码" tip="请输入手机验证码" value="{{ old('mobCode') }}" /></dt>
                                            <dd style="width: 130px; margin-right: 0px; display: block">
                                                <input name="mobcode" id="mobcode" type="button" onclick="getMobileCode($(this),$('#mobile'),'{{captcha_src('code')}}','{{ url('common/ajax_code') }}','{{ url('personal/ajax_mob_login_code') }}')" class="mobcode" value="点击获取验证码" />
                                            </dd>
                                            <dd class="errinfo"></dd>
                                        </dl>
                                        <dl>
                                            <dt><input id="sub" value="登录" type="submit" class="sub"></dt>
                                        </dl>
                                    </form>
                                    <div class="noPerson"><span>还不是个人会员?</span> <a href="{{ url('personal/register') }}">立即注册<i></i></a></div>
                                </div>


                            </div>
                            {{--会员登录右边--}}
                            <div class="wRight">

                                <div class="qrcode">
                                    <span class="qTitle">[ 扫一扫使用微信端 ]</span>
                                    <span class="code"><img
                                                src="{{asset('/default/images/logo/code_weixin.png')}}"/> </span>
                                </div>
                                <div class="chLogin">
                                    <dl>
                                        <dt>使用以下帐号直接登录：</dt>
                                        @if(!empty(site::get('personAppid')))
                                        <dd><a href="{{ url("personal/qqlogin") }}"><i class="qq_icon"></i></a></dd>
                                        @endif
                                        @if(!empty(site::get('mpPersonOpenAppID')))
                                        <dd class="weixin"><a href="{{ weiXinlogin('personal') }}"><i class="wexin_icon"></i></a></dd>
                                        @endif
                                    </dl>
                                </div>

                            </div>
                        </div>
                    {{--弹性运动--}}
                    </div>
                </div>
                {{--弹性运动--}}
            </div>

        </div>
    </div>
@endsection

@section('footerjs')
    @parent
    <script>
        var _token = "{{csrf_token()}}";

        var errMsg = "{{ session('errMsg') }}";
        layer.ready(function() {
            if (errMsg != '') {
                layer.msg(errMsg, {icon: 5});
            }
        });
        //获取手机号码
        $(function(){
            if('{{request('mobile')}}' != ''){
                $('.ordinary').find('ul li').eq(1).addClass('active').siblings().removeClass('active');
                $('.ordInfo').hide();
                $('.mobInfo').show();
            }
        });
    </script>
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.validate.extend.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.enplaceholder.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/personal/move.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/personal/login.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/mobile_code.js')}}"></script>

@endsection